require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 5,["5"] = 5,["6"] = 7,["7"] = 7,["8"] = 7,["10"] = 16,["11"] = 17,["12"] = 18,["13"] = 19,["14"] = 20,["17"] = 24,["18"] = 25,["19"] = 26,["20"] = 14,["21"] = 29,["22"] = 30,["23"] = 31,["24"] = 32,["25"] = 33,["26"] = 35,["27"] = 35,["28"] = 35,["29"] = 36,["30"] = 36,["31"] = 36,["32"] = 36,["33"] = 35,["34"] = 35,["36"] = 29,["37"] = 10,["38"] = 12,["39"] = 7});
local ____exports = {}
local ____BaseUtil = require("solar.util.BaseUtil")
local BaseUtil = ____BaseUtil.default
____exports.default = __TS__Class()
local DeleteAbilityFromUnitOnUseAbilityState = ____exports.default
DeleteAbilityFromUnitOnUseAbilityState.name = "DeleteAbilityFromUnitOnUseAbilityState"
function DeleteAbilityFromUnitOnUseAbilityState.prototype.____constructor(self)
    local config = ____exports.default.config
    for configKey in pairs(config) do
        local configData = config[configKey]
        for ____, configDatum in ipairs(configData) do
            ____exports.default.cache[configDatum] = configKey
        end
    end
    local triggerHandle = CreateTrigger()
    TriggerRegisterAnyUnitEventBJ(triggerHandle, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    TriggerAddAction(triggerHandle, self.action)
end
function DeleteAbilityFromUnitOnUseAbilityState.prototype.action()
    local spellAbilityIdStr = id2string(GetSpellAbilityId())
    local needDeleteAbilityIdStr = ____exports.default.cache[spellAbilityIdStr]
    if needDeleteAbilityIdStr then
        local unit = GetTriggerUnit()
        BaseUtil.runLater(
            0.01,
            function()
                UnitRemoveAbility(
                    unit,
                    FourCC(needDeleteAbilityIdStr)
                )
            end
        )
    end
end
DeleteAbilityFromUnitOnUseAbilityState.config = {}
DeleteAbilityFromUnitOnUseAbilityState.cache = {}
____exports.default = DeleteAbilityFromUnitOnUseAbilityState
return ____exports
